package br.com.techfor.model.helper;

import javax.servlet.http.HttpServletRequest;

import br.com.techfor.command.CadastrarFuncionario;
import br.com.techfor.command.ConsultarFuncionario;
import br.com.techfor.command.InterfaceCommand;

public class Helper {

	private HttpServletRequest request;

	public Helper(HttpServletRequest request) {
		super();
		this.request = request;
	}

	public InterfaceCommand getCommand() {

		String cmd = this.request.getParameter("cmd");

		if (cmd.equals("cadastrarFuncionario") || cmd == null)

			return new CadastrarFuncionario();
		
		
		
		if (cmd.equals("consultarFuncionario"))

			return new ConsultarFuncionario();
		
		
		
		return new ConsultarFuncionario();

	}

}
